<h1><?php echo $title; ?></h1>

<?php if (isset($notice) || $notice = $this->session->flashdata('notification')):?>
<p class="notice"><?php echo $notice;?></p>
<?php endif;?>



<form method='post' name="form1" id="form1" action="<?php echo site_url('adozioni/anagrafica/adozioni/results') ?>" >
<input type="hidden" name="filter[trashed]" value="0" />
<div class="form">


<div class="row">
	<div class="label">
		<label><?php echo __("Stato Adozione", $module) ?></label>
	</div>
	<div style="padding-left: 200px">
		<?php if($rows = $this->ado->get_stato()): ?>
		<?php $i= 0; foreach($rows as $a): ?>
		<?php echo $a['nome'] ?>  <input type="checkbox" name="filter[id_stato][]" value="<?php echo $a['id'] ?>" <?php if($i > 0) echo "checked"; ?>><br />
		<?php $i++; endforeach; ?>
		<?php endif; ?>
	</div>
</div>


<div class="row">
	<div class="label">
		<label for="filter[id_missione]"><?php echo __("Missione", $module) ?></label>
	</div>
	<div class="input">
		<select name="filter[id_missione]" id="filter[id_missione]">
		<option></option>
		<?php if($rows = $this->ado->get_missioni()): ?>
		<?php foreach($rows as $a): ?>
		<option value="<?php echo $a['id'] ?>"><?php echo $a['nome'] ?></option>
		<?php endforeach; ?>
		<?php endif; ?>
		</select>
	</div>
</div>

<div class="row">
	<div class="label">
		<label><?php echo __("Nome Assistito", $module) ?></label>
	</div>
	<div class="input">
		<input type="text" id="filter[assistito]" name="filter[assistito]" value="" class=""/>
	</div>
</div>

<div class="row">
	<div class="label">
		<label><?php echo __("Nome Sostenitore", $module) ?></label>
	</div>
	<div class="input">
		<input type="text" id="filter[sostenitore]" name="filter[sostenitore]" value="" class=""/>
	</div>
</div>

<div class="row">
	<div class="label">
		<label for="filter[s_from_day]"><?php echo __("Data inserimento", $module) ?></label>
	</div>
	<div class="">
		<?php echo __("Da : ", $module) ?><?php echo $this->ass->select_generic("filter[s_from_day]", 1, 31) ?>/<?php echo $this->ass->select_generic("filter[s_from_month]", 1, 12) ?>/<?php echo $this->ass->select_anni("filter[s_from_year]") ?> 
		<?php echo __("A : ", $module) ?><?php echo $this->ass->select_generic("filter[s_to_day]", 1, 31) ?>/<?php echo $this->ass->select_generic("filter[s_to_month]", 1, 12) ?>/<?php echo $this->ass->select_anni("filter[s_to_year]") ?>
	</div>
</div>

<div class="row">
	<div class="label">
		<label for="filter[i_from_day]"><?php echo __("Data inizio", $module) ?></label>
	</div>
	<div class="">
		<?php echo __("Da : ", $module) ?><?php echo $this->ass->select_generic("filter[i_from_day]", 1, 31) ?>/<?php echo $this->ass->select_generic("filter[i_from_month]", 1, 12) ?>/<?php echo $this->ass->select_anni("filter[i_from_year]") ?> 
		<?php echo __("A : ", $module) ?><?php echo $this->ass->select_generic("filter[i_to_day]", 1, 31) ?>/<?php echo $this->ass->select_generic("filter[i_to_month]", 1, 12) ?>/<?php echo $this->ass->select_anni("filter[i_to_year]") ?>
	</div>
</div>

<div class="row">
	<div class="label">
		<label for="filter[f_from_day]"><?php echo __("Data fine", $module) ?></label>
	</div>
	<div class="">
		<?php echo __("Da : ", $module) ?><?php echo $this->ass->select_generic("filter[f_from_day]", 1, 31) ?>/<?php echo $this->ass->select_generic("filter[f_from_month]", 1, 12) ?>/<?php echo $this->ass->select_anni("filter[f_from_year]") ?> 
		<?php echo __("A : ", $module) ?><?php echo $this->ass->select_generic("filter[f_to_day]", 1, 31) ?>/<?php echo $this->ass->select_generic("filter[f_to_month]", 1, 12) ?>/<?php echo $this->ass->select_anni("filter[f_to_year]") ?>
	</div>
</div>

<div class="row">
	<div class="label">
		<label for="filter[u_from_day]"><?php echo __("Ultimo contatto", $module) ?></label>
	</div>
	<div class="">
		<?php echo __("Da : ", $module) ?><?php echo $this->ass->select_generic("filter[u_from_day]", 1, 31) ?>/<?php echo $this->ass->select_generic("filter[u_from_month]", 1, 12) ?>/<?php echo $this->ass->select_anni("filter[u_from_year]") ?> 
		<?php echo __("A : ", $module) ?><?php echo $this->ass->select_generic("filter[u_to_day]", 1, 31) ?>/<?php echo $this->ass->select_generic("filter[u_to_month]", 1, 12) ?>/<?php echo $this->ass->select_anni("filter[u_to_year]") ?>
	</div>
</div>

<div class="row">
	<div class="label">
		<label for="filter[id_tiposostegno]"><?php echo __("Tipo di adozione", $module) ?></label>
	</div>
	<div style="padding-left: 200px">
		<?php if($rows = $this->ado->get_tiposostegno()): ?>
		<?php foreach($rows as $a): ?>
		<?php echo $a['nome'] ?>  <input type="checkbox" name="filter[id_tiposostegno][]" value="<?php echo $a['id'] ?>"><br />
		<?php endforeach; ?>
		<?php endif; ?>
	</div>
</div>


<div class="row">
	<div class="label">
		<label for="filter[id_gruppo]"><?php echo __("Gruppo di appartenenza", $module) ?></label>
	</div>
	<div class="input">
		<select name="filter[id_gruppo]" id="filter[id_gruppo]">
		<option></option>
		<?php if($rows = $this->sos->get_gruppi()): ?>
		<?php foreach($rows as $a): ?>
		<option value="<?php echo $a['id'] ?>"><?php echo $a['nome'] ?></option>
		<?php endforeach; ?>
		<?php endif; ?>
		</select>
	</div>
</div>


<div class="row">
	<div class="label">
		<label><?php echo __("Info assistiti", $module) ?></label>
	</div>
	<div class="input">
		<input type="text" id="filter[info]" name="filter[info]" value="" class=""/>
	</div>
</div>

<div class="row">
	<div class="label">
		<label><?php echo __("Note", $module) ?></label>
	</div>
	<div class="input">
		<input type="text" id="filter[note]" name="filter[note]" value="" class=""/>
	</div>
</div>



<div class="buttons">


<input type="submit" name="submit" id="submit" value=" <?php echo __("Cerca", $module) ?> " />
<a href="<?php echo site_url('adozioni/anagrafica/assistiti') ?>" ><?php echo __("Annulla", $module) ?></a>
</div>
</div>
</form>